////
////  Floor2View.swift
////  GOFM
////
////  Created by siri on 2024/11/7.
////  Copyright © 2024 Glad. All rights reserved.
////
//
import SwiftUI

struct FloorView: View {
    var areaCode: Int
    var floorArray = ["5L","4L","3L","2L","1L"]
    @State public var selectFloorIndex = 0
    
    var body: some View {

            VStack(spacing: 0) {
                ForEach(0..<floorArray.count,id:\.self) {
                    index in Button(action: {
                        self.selectFloorIndex = index
                    }) {
                        Text(floorArray[index]).frame(width: 90, height: 50)
                            .font(Font.g_font_body_regular16)
                            .foregroundColor(Color.g_color_font_primary).background(selectFloorIndex == index ? Color.white: Color.g_color_bg_grey)
                    }
                }
            }.frame(width: 90,height: 600,alignment: .top).background(Color.g_color_bg_grey)
         
     
        
    }
}

#Preview {
    FloorView(areaCode: 0)
}
